package com.xiaoka.camelv.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.thinkgem.jeesite.common.persistence.IdEntity;

/**
 * camel JDBC资源<br/>
 * 1.在添加的同时注册到各个节点<br/>
 * 2.在各个节点启动时注册到各个节点<br/>
 * 
 * @author xiaoka
 *
 */
@Entity
@Table(name = "camelv_jdbc")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class CamelvJdbc extends IdEntity<CamelvJdbc> {
	private static final long serialVersionUID = 100000001L;
	// 资源名称
	private String name;
	// 驱动名称
	private String driver;
	// 数据库连接地址
	private String url;
	// 连接用户名
	private String username;
	// 连接密码
	private String password;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDriver() {
		return driver;
	}

	public void setDriver(String driver) {
		this.driver = driver;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public String toString() {
		return "CamelvJdbc [name=" + name + ", driver=" + driver + ", url=" + url + ", username=" + username
				+ ", password=" + password + "]";
	}
}
